package drawingObjects;

import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Point;

import javax.swing.JComponent;

public abstract class DrawingObject extends JComponent {

	public DrawingObject() {
		this.color = Color.BLACK;
		this.stroke = 1;
	}
	
	public Color color;
	public int stroke;
	public abstract void start(Point p);
	public abstract void step(Point p);
	public void paintComponent(Graphics g){
		super.paintComponent(g);
		g.setColor(this.color);
		Graphics2D g2 = (Graphics2D)g;
		g2.setStroke(new BasicStroke(this.stroke,BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND));
	}
	public abstract boolean commit();

}
